Availability needed | daily | weekly | yearly |
---|---|---|---|
100% | 0 | 0 | 0 |
99.999% | <0.9s | 6s | <5min |
99.99% | <8s | 1min | 52min |
99.9% | 1.5min | 10min | 8h45min |
99.999% during daytime | 0.4s | 3s | <3min |
When designing distributed web services, there are three properties that are commonly desired: consisteny, availability, and partition tolerance. It is impossible to achieve all three.
Each node will see the last (committed) version of the data.
The system will always answer something different than an error message.
The network will be allowed to lose arbitrarily many messages sent from one node to another without altering the system answers.
RDBMS are CA⟶ True and False
RDBMS in single node configuration are CA
RDBMS are CA⟶ True and False
RDBMS with asynchronous streaming replication are AP
RDBMS are CA⟶ True and False
RDBMS with synchronous streaming replication are neither CP, neither AP
In case of network partitioning (P) in a distributed computer system, one has to choose between availability (A) and consistency (C),
but else (E), even when the system is running normally in the absence of partitions, one has to choose between latency (L) and consisteny (C).
Latency is the amount of time the system needs to answer when it's smaller than a request timeout.
RPO | Architecture | |
---|---|---|
≥ 15min | Physical backup + WALs archiving | |
≥ 1min | Physical backup + WALs archiving + Asynchronous princess | |
≥ 200ms | Physical backup + WALs archiving + Synchronous princess (+ asynchronous princess) | |
0 | Not possible 😏 |
RTO | Architecture |
---|---|
≥ 24h | Physical backup + WALs archiving (depending on the time to restore) |
≥ 30min | Princess + manual failover |
≥ 5min | Princess + automatic failover |
RTO | Architecture |
---|---|
≥ 1min/30s | Multi-queens |
0 | Not possible 😏 |
Unicorns are more real than 0-dataloss and 99.999% availability.Gülçin Yıldırım Jelínek, Prague, 2019-08-27